import request from '@/utils/request'

/**
 * 获取角色列表
 * @returns
 */
export const getTagListAPI = () => {
  return request({
    url: '/tag',
    method: 'GET'
  })
}

export const getTagByIdAPI = (id) => {
  return request({
    url: `/tag/${id}`,
    method: 'GET'
  })
}

// 新增
export const addTagAPI = (data) => {
  return request({
    url: '/tag',
    method: 'POST',
    data
  })
}

// 编辑
export const putTagAPI = (id, data) => {
  return request({
    url: `/tag/${id}`,
    method: 'PUT',
    data
  })
}

export const delTagByIdAPI = (id) => {
  return request({
    url: `/tag/${id}`,
    method: 'DELETE'
  })
}
